﻿using Microsoft.Xna.Framework;

namespace IcicleFramework.Components.Actions
{
    public class TimedAutoExecuteAction : TimedAction
    {
        public override void Initialize()
        {
            base.Initialize();

            PerformingActions = true;
            PrepareForExecution();
        }

        public override void Update(GameTime gameTime)
        {
            if (!PerformingActions && !ContinuousActions)
                Parent.RemoveAction(Name);

            base.Update(gameTime);
        }
    }
}
